import { useQuery } from 'react-query';
import { request } from '@/request';

const useGroup = (ID: string) => {
    const { refetch, data } = useQuery(['getGroup', ID], async () => request(`/groups/${ID}`), {
        enabled: false
    });

    return {
        refetch,
        data: data?.data
    }

}

export default useGroup